<?php
while (!feof(STDIN)) {
    $line = fread(STDIN, 100);
    file_put_contents('./bock.txt',$line);

    switch (0 + $line){
        case 4:
            echo '向左移动中..'.PHP_EOL;
            break;
        case 6:
            echo '向右移动中..'.PHP_EOL;
            break;
        case 5:
            echo '加速移动中..'.PHP_EOL;
            break;
        case 8:
            echo '变换形态..'.PHP_EOL;
            break;
        default:
            break;
    }
}